# $Id: PKGBUILD 183606 2013-04-24 20:33:35Z heftig $
# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgname=libsoup
pkgver=2.42.2
pkgrel=1
pkgdesc="GNOME HTTP Library"
arch=(i686 x86_64)
license=(LGPL)
url="http://www.gnome.org"
depends=(glib2 libxml2 glib-networking sqlite)
makedepends=(intltool gobject-introspection python2)
provides=("libsoup-gnome=$pkgver-$pkgrel")
conflicts=(libsoup-gnome)
replaces=(libsoup-gnome)
options=('!libtool' '!emptydirs')
source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz)
sha256sums=('1f4f9cc55ba483dc8defea0c3f97cc507dc48384c5529179e29c1e6d05630dbf')

build() {
  cd $pkgname-$pkgver

  # Python3 has UnicodeDecodeErrors
  sed -i -e '1s/python$/&2/' libsoup/tld-parser.py

  ./configure --prefix=/usr --sysconfdir=/etc \
      --localstatedir=/var --disable-static
  make
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
}
